home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / CH5 / EMAGA5 / control / client / initialize.cs < prev    next >
Text File  |  2006-09-21  |  2KB  |  47 lines

  1. //============================================================================
  2. // control/client/initialize.cs
  3. //
  4. //  client control initialization module for 3D2E emaga5 sample game
  5. //
  6. //  Copyright (c) 2003 by Kenneth C.  Finney.
  7. //============================================================================
  8.  
  9. function InitializeClient()
  10. //----------------------------------------------------------------------------
  11. // Prepare some global client information, fire up the graphics engine,
  12. // and then connect to the server code that is already running in another
  13. // thread.
  14. //----------------------------------------------------------------------------
  15. {
  16.    Echo("\n++++++++++++ Initializing module: emaga5 client ++++++++++++");
  17.  
  18.    InitBaseClient(); // basic client features defined in the common modules
  19.  
  20.    // Make sure a canvas has been built before any interface definitions are
  21.    // loaded because most controls depend on the canvas to already exist when
  22.    // they are loaded.
  23.  
  24.    InitCanvas("Emaga5 - 3D2E Sample Game"); // Start the graphics system.
  25.  
  26.    // Interface definitions
  27.    Exec("./profiles.cs");
  28.    Exec("./default_profile.cs");
  29.    Exec("./interfaces/splashscreen.gui");
  30.    Exec("./interfaces/MenuScreen.gui");
  31.    Exec("./interfaces/loadscreen.gui");
  32.    Exec("./interfaces/playerinterface.gui");
  33.  
  34.    // Interface scripts
  35.    Exec("./misc/Screens.cs");
  36.    Exec("./misc/presetkeys.cs");
  37.    Exec("./client.cs");
  38.  
  39.    // these modules rely on things defined in the common code
  40.    // that are activated in the InitBaseClient() function above
  41.    // so must be located after it has been called
  42.    Exec("./misc/transfer.cs");
  43.    Exec("./misc/connection.cs");
  44.  
  45.    Canvas.setContent(SplashScreen);
  46. }
  47.